Skip to content

fix: resolve default values for optional flow inputs at runtime#7

Merged
moekatib merged 1 commit intomainfrom
fix/flow-engine-default-input-values
Mar 24, 2026
Merged

fix: resolve default values for optional flow inputs at runtime#7
moekatib merged 1 commit intomainfrom
fix/flow-engine-default-input-values

Conversation

@moekatib
Copy link
Contributor

Summary

  • FlowRunner was passing raw user inputs to the execution context without applying declared default values from input definitions
  • When executeFlow received a resumeState (which FlowRunner.execute() always provides), it skipped its own default resolution at lines 816-824
  • Fix: resolve defaults in the FlowRunner constructor so this.state.inputs has defaults applied before context creation

Test plan

  • Create a flow with optional inputs that have default values
  • Execute without providing those inputs — verify defaults are used (not undefined)
  • Execute providing those inputs — verify provided values take precedence over defaults
  • Resume a paused flow with default inputs — verify defaults persist

Closes #6

🤖 Generated with Claude Code

FlowRunner was passing raw inputs directly to the context, bypassing
default resolution. When executeFlow received a resumeState it skipped
its own default resolution logic. Now defaults are resolved in the
FlowRunner constructor so both fresh and resumed runs see them.

Closes #6

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@moekatib moekatib merged commit 99250e6 into main Mar 24, 2026
@moekatib moekatib deleted the fix/flow-engine-default-input-values branch March 24, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[flow engine] Default values for optional inputs are not resolved at runtime

1 participant